import { Camera3D } from 'feng3d-three';
import { TrackballControls } from '../thirdparty/three/imports';

export class TrackballControls3D
{
    _trackballControls: TrackballControls;

    constructor(object: Camera3D, domElement?: HTMLElement)
    {
        this._trackballControls = new TrackballControls(object.entity as any, domElement);
    }

    update()
    {
        this._trackballControls.update();
    }

    get minDistance()
    {
        return this._trackballControls.minDistance;
    }
    set minDistance(v)
    {
        this._trackballControls.minDistance = v;
    }

    get maxDistance()
    {
        return this._trackballControls.maxDistance;
    }
    set maxDistance(v)
    {
        this._trackballControls.maxDistance = v;
    }
}
